import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author hjc-YYDS
 * @date 2024/3/4 16:21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    //姓名，性别，生日，邮箱，积分
    @ExcelProperty(value = "昵称")
    private String name;

    @ExcelProperty(value = "性别")
    private String gender;

    @DateTimeFormat(value = "yyyy年MM月dd日")
    @ExcelProperty(value = "生日")
    private String birthday;

    //@ExcelIgnore 该注解可以在导出时忽略该字段
    //@ExcelIgnore
    @ExcelProperty(value = "邮箱")
    private String email;

    @ExcelProperty(value = "积分")
    private int score;

    //将小数转换为百分数
    //@NumberFormat(value = "#.##%")
    //private String rank;
}
